const Router = require("koa-router");
const {
  articleAll,
  articleAdd,
  articleOne,
  articleDel,
  articleUpdateOne,
} = require("../controller/article");

const router = new Router({
  prefix: "/api",
});

router.get("/all", articleAll);

router.post("/add", articleAdd);

router.get("/one/:id", articleOne);

router.delete("/del/:id", articleDel);

router.post("/update", articleUpdateOne);

module.exports = router;
